package com.happyscan138.makefun;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;

/**
 * Created by Administrator on 2017/1/7.
 */

public class About extends AppCompatActivity implements View.OnClickListener{
    private LinearLayout help;
    private LinearLayout update;
    private LinearLayout agreement;
    private LinearLayout feedback;
    private ImageButton back;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.about);
        initView();
    }
    public void initView(){
        help=(LinearLayout)findViewById(R.id.about_help);
        help.setOnClickListener(this);
        update=(LinearLayout)findViewById(R.id.about_update);
        update.setOnClickListener(this);
        agreement=(LinearLayout)findViewById(R.id.ahout_agreement);
        agreement.setOnClickListener(this);
        feedback=(LinearLayout)findViewById(R.id.aboout_feedback);
        feedback.setOnClickListener(this);
        back=(ImageButton)findViewById(R.id.aboutBack);
        back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.about_help:
                startActivity(new Intent(About.this,Help.class));
                break;
            case R.id.about_update:
                startActivity(new Intent(About.this,Update.class));
                break;
            case R.id.ahout_agreement:
                startActivity(new Intent(About.this,AgreeMent.class));
                break;
            case R.id.aboout_feedback:
                startActivity(new Intent(About.this,FeedBack.class));
                break;
            case R.id.aboutBack:
                finish();
                break;
        }
    }
}
